package com.jic.member.api.rest;


import com.jic.member.request.TestSendMessageRequest;
import com.jic.member.response.MessageResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 触达方式（发送消息）- 短信、邮件、AppPush、公众号
 * 发放优惠券、红包、推送活动、商品后续动作
 * @author MJ
 */
@FeignClient(name = "jic-member",path = "/messageApi")
public interface MessageApi {

    /**
     * 发放优惠券、红包、推送活动、商品后续动作
     * @param tripId
     * @param branchNodeId
     * @param userIds
     * @return
     */
    @PostMapping("branchNodeBySendMessage")
    public Boolean branchNodeBySendMessage(@RequestParam("tripId") Long tripId, @RequestParam("branchNodeId") Long branchNodeId, @RequestParam("userIds") List<String> userIds);

    @PostMapping("sendTestMessage")
    MessageResponse sendTestMessage(@RequestBody TestSendMessageRequest testSendMessageRequest);

}
